#ifndef _FL_NETWORK_PROTOCOL_H__
#define _FL_NETWORK_PROTOCOL_H__

#include <stdarg.h>

class TCPSocket;

class NetworkProtocol
{
public:
	NetworkProtocol();
	virtual ~NetworkProtocol();

	void setTCPSocket(TCPSocket* socket);
	/// Consume Packet, return used length
	virtual int consumePacket(const char* buffPacket, const int sizeBuff);

	/// Make Packet, return composed length
	virtual int makePacket(char* buffPacket, const int sizeRemain, unsigned int cmd_id, va_list* pargs);

protected:
	TCPSocket* m_pOwnerSocket;
};

#endif